package com.github.kotvertolet.youtubejextractor.models.newModels;

import com.google.gson.annotations.SerializedName;
import ohos.utils.Parcel;
import ohos.utils.Sequenceable;

import java.io.Serializable;

public class ThumbnailsItem implements Sequenceable, Serializable {

    @SerializedName("width")
    private int width;

    @SerializedName("height")
    private int height;

    @SerializedName("url")
    private String url;



    public static final Sequenceable.Producer<ThumbnailsItem> CREATOR = new Producer<ThumbnailsItem>() {
        @Override
        public ThumbnailsItem createFromParcel(Parcel parcel) {
            // Initialize an instance first, then do customized unmarshlling.
            ThumbnailsItem thumbnailsItem = new ThumbnailsItem();
            thumbnailsItem.unmarshalling(parcel);
            return thumbnailsItem;
        }
    };
    
    
    
    @Override
    public boolean marshalling(Parcel parcel) {
        parcel.writeInt(this.width);
        parcel.writeInt(this.height);
        parcel.writeString(this.url);
        return true;
    }

    @Override
    public boolean unmarshalling(Parcel parcel) {
        this.width=parcel.readInt();
        this.height=parcel.readInt();
        this.url=parcel.readString();
        return true;
    }

    @Override
    public String toString() {
        return "ThumbnailsItem{" +
                "width = '" + width + '\'' +
                ",url = '" + url + '\'' +
                ",height = '" + height + '\'' +
                "}";
    }

    public int getWidth() {
        return width;
    }

    public void setWidth(int width) {
        this.width = width;
    }

    public int getHeight() {
        return height;
    }

    public void setHeight(int height) {
        this.height = height;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }
}
